import { BasicColumn, FormSchema } from '@apps/antd-admin/src/components/table';
import { render } from '@apps/antd-admin/src/hooks/render/renderUtils';

export const columns: BasicColumn[] = [
  {
    title: '公众号名称',
    dataIndex: 'weChatName',
    width: 120,
  },
  {
    title: '飞鸽签名Id',
    dataIndex: 'feiNiaoSmsSignId',
    width: 120,
  },
  {
    title: '公众号code',
    dataIndex: 'weChatCode',
    width: 100,
  },
  {
    title: '24小时热线',
    dataIndex: 'hoursHotline24',
    width: 120,
  },
  {
    title: '监督投诉专线',
    dataIndex: 'servicePhone',
    width: 120,
  },
  {
    title: '菜单栏介绍',
    dataIndex: 'weChatMenuDesc',
    width: 200,
  },
  {
    title: '微信卡券Id',
    dataIndex: 'wxCardId',
    width: 220,
  },
  {
    title: '电话图标',
    dataIndex: 'phoneIcon',
    width: 60,
    customRender: render.renderImage,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 150,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'weChatName',
    label: '公众号名称',
    component: 'Input',
    colProps: { span: 4 },
  },
];

export const formSchema: FormSchema[] = [
  {
    label: '公众号名称',
    field: 'weChatName',
    component: 'Input',
    required: true,
  },
  {
    label: '公众号code',
    labelWidth: 100,
    field: 'weChatCode',
    component: 'Input',
    required: true,
  },
  {
    label: '飞鸽短信签名',
    labelWidth: 100,
    field: 'feiNiaoSmsSignId',
    component: 'Input',
    required: true,
  },
  {
    label: '24小时热线',
    labelWidth: 100,
    field: 'hoursHotline24',
    component: 'Input',
    required: true,
  },
  {
    label: '监督投诉专线',
    labelWidth: 100,
    field: 'servicePhone',
    component: 'Input',
    required: true,
  },
  {
    label: '菜单栏介绍',
    field: 'weChatMenuDesc',
    component: 'Input',
    required: true,
    colProps: { span: 24 },
  },
  {
    label: '电话图标',
    field: 'phoneIcon',
    component: 'ImageUpload',
  },
];
